package com.example.computer_component_manager.util

import android.content.Context
import android.widget.Toast
import com.example.computer_component_manager.R

object ToastUtil {

    fun showShortError(context: Context?) {
        Toast.makeText(context,
            context?.getString(R.string.error),
            Toast.LENGTH_SHORT).show()
    }

    fun showShortSuccess(context: Context?, msg: String?) {
        Toast.makeText(
            context,
            msg ?: context?.getString(R.string.success),
            Toast.LENGTH_SHORT).show()
    }

}